var p1 = new Promise(((resolve, reject) => {
    resolve('成功了')
}));

var p2 = new Promise(((resolve, reject) => {
    resolve('success')
}));
var p3 = new Promise(((resolve, reject) => {
    reject('失败了')
}));

p1.catch(reason => {
    console.log('p1 执行失败')
});
p2.catch(reason => {
    console.log('p2 执行失败')
});
p3.catch(reason => {
    console.log('p3 执行失败')
});


Promise.all([p1,p2]).then(result=>{
    console.log(result);

}).catch(reason => {
    console.log(reason)
})

Promise.all([p1,p2,p3]).then(result=>{
    console.log(result);

}).catch(reason => {
    console.log(reason)
})


